package jnpf.common.enums.dify;


/**
 * String,String 通用enum类
 * <br>
 */
public enum DifyApiEnum {
    CREATE_DOCUMENT_BY_TEXT("通过文本创建文档", "/datasets/{dataset_id}/document/create_by_text", "POST"),
    CREATE_DOCUMENT_BY_FILE("通过文件创建文档", "/datasets/{dataset_id}/document/create_by_file", "POST"),
    CREATE_EMPTY_DATASET("创建空知识库", "/datasets", "POST"),
    GET_DATASET_LIST("获取知识库列表", "/datasets", "GET"),
    DELETE_DATASET("删除知识库", "/datasets/{dataset_id}", "DELETE"),
    UPDATE_DOCUMENT_BY_TEXT("通过文本更新文档", "/datasets/{dataset_id}/documents/{document_id}/update_by_text", "POST"),
    UPDATE_DOCUMENT_BY_FILE("通过文件更新文档", "/datasets/{dataset_id}/documents/{document_id}/update_by_file", "POST"),
    GET_DOCUMENT_INDEXING_STATUS("获取文档嵌入状态（进度）", "/datasets/{dataset_id}/documents/{batch}/indexing-status", "GET"),
    DELETE_DOCUMENT("删除文档", "/datasets/{dataset_id}/documents/{document_id}", "DELETE"),
    GET_DATASET_DOCUMENT_LIST("获取知识库文档列表", "/datasets/{dataset_id}/documents", "GET"),
    ADD_DOCUMENT_SEGMENT("新增分段", "/datasets/{dataset_id}/documents/{document_id}/segments", "POST"),
    QUERY_DOCUMENT_SEGMENT("查询文档分段", "/datasets/{dataset_id}/documents/{document_id}/segments", "GET"),
    DELETE_DOCUMENT_SEGMENT("删除文档分段", "/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}", "DELETE"),
    UPDATE_DOCUMENT_SEGMENT("更新文档分段", "/datasets/{dataset_id}/documents/{document_id}/segments/{segment_id}", "POST"),

    CREATE_DIFY_AI("创建DIfyAI", "/console/api/apps", "POST"),
    UPDATE_DIFY_AI("更新DifyAI", "/console/api/apps/{id}", "PUT"),
    SET_META("设置元数据", "/v1/document/set_meta", "POST"),
    GET_OBj_IMG("获取实例图谱数据", "/v1/kb/{dataset_id}/knowledge_graph", "GET"),
    GET_MODEL_SELECT_LIST("获取模型可选列表", "/v1/llm/list", "GET"),
    RAG_CREATE_HELP("rag创建助手", "/v1/dialog/set", "POST"),
    RAG_UPDATE_HELP("rag更新助手", "/v1/dialog/set", "POST"),
    RAG_DELETE_HELP("rag删除助手", "/v1/dialog/rm", "POST"),
    DIFY_DELETE_HELP("dify删除助手", "/console/api/apps/{id}", "DELETE"),


    CREATE_KNOW("创建知识库", "/v1/kb/create", "POST"),
    UPDATE_KNOW("更新知识库", "/v1/kb/update", "POST"),

    CREATE_CHAT_MESSAGE("创建会话消息", "/chat-messages", "POST"),
    UPLOAD_FILE("上传文件", "/files/upload", "POST"),
    STOP_CHAT("终止对话", "/chat-messages/{task_id}/stop", "POST"),
    LIKE_MESSAGE("消息点赞", "/messages/{message_id}/feedbacks", "POST"),
    GET_SUGGESTED_QUESTIONS("获取下一轮建议问题列表", "/messages/{message_id}/suggested", "GET"),
    GET_CHAT_HISTORY_MESSAGES("获取会话历史消息", "/messages?user={user}&conversation_id={conversation_id}&limit={limit}", "GET"),
    GET_CONVERSATION_LIST("获取会话列表", "/conversations?user={user}&last_id={last_id}&limit={limit}", "GET"),
    DELETE_CONVERSATION("删除会话", "/conversations/{conversation_id}", "DELETE"),
    RENAME_CONVERSATION("会话重命名", "/conversations/{conversation_id}/name", "POST"),
    AUDIO_TO_TEXT("语音转文字", "/audio-to-text", "POST"),
    TEXT_TO_AUDIO("文字转语音", "/text-to-audio", "POST"),
    GET_APP_PARAMETERS("获取应用配置信息", "/parameters", "POST"),
    GET_APP_META("获取应用Meta信息", "/meta", "POST"),

    WORK_FLOW("创建流式对话信息", "/workflows/run", "POST"),

    ;

    private final String des;
    private final String api;
    private final String apiType;

    DifyApiEnum(String des, String api, String apiType) {
        this.des = des;
        this.api = api;
        this.apiType = apiType;
    }

    public String getDes() {
        return des;
    }

    public String getApi() {
        return api;
    }

    public String getApiType() {
        return apiType;
    }

}

